package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-05-30
 * Time: 18:51
 */
public class Dog extends Animal{


    public Dog(String name, int age) {
        super(name,age);
        System.out.println("Dog()");
    }

    public void bark(){
        System.out.println(this.name + " 正在旺旺叫 ");
    }
   /* public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //@Override
    public String vtoString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';*/
    }

